<!DOCTYPE html>
<html>
<head>
    <title>$app.topic 用户管理</title>
    #parse("/inc/meta.htm")
</head>
<body id="inner_page_start">

<div class="modal fade" id="ex-back-big" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <form action="/suser/withdraw" type="post">
            <input type="hidden" name="uid" id="add_id" value="$!count.uid" />
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title h4" id="myExtraLargeModalLabel">客户取款</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="form-group  row">
                        <div class="col-sm-2"></div>
                        <label for="menu-money" class="col-form-label col-sm-2">金额</label>
                        <div class="col-sm-6"><input type="text" class="form-control" id="menu-money" name="money" required/></div>
                    </div>
                    <div class="form-group  row">

                    </div>
                    <!--<div class="form-group row">
                        <div class="col-sm-2"></div>
                        <label for="menu-des" class="col-form-label col-sm-2">描述</label><div class="col-sm-6">
                        <input type="text" class="form-control" id="menu-des" name="des"/></div>
                    </div>-->
                </div>
                <div class="modal-footer">
                    <button type="submit" class="btn btn-primary" id="sub-button-add">确定已提现</button>
                </div>
            </div>
        </form>
    </div>
</div>

#parse("/inc/header.htm")

<div id="wrapper">

    #parse("/inc/menu.htm")

    <div id="content-wrapper">

        <div class="container-fluid">

            <!-- 面包屑-->
            <ol class="breadcrumb">
                <li class="breadcrumb-item">
                    用户管理
                </li>
                <li class="breadcrumb-item active">邀请详情</li>
            </ol>

            <div class="card mb-3">
                <div class="card-header">
                    <i class="fas fa-table"></i>
                    用户邀请充值记录浏览</div>
                <div class="card-body">
                    <form id="list_form" action="/suser/invite" >
                        <input type="hidden" name="page"  id="list_page" value="$respData.pagenumber" />
                        <input type="hidden" name="id"  id="list_id" value="$form.id" />

                        <div class="form-inline">
                            <div class="form-group mx-sm-3">
                                <label>时间:
                                    <input type="text" class="form-control form-control-sm form_date" name="ctime"
                                           value="$!form.ctime" />
                                </label>

                            </div>
                            <div class="form-group mx-sm-3">
                                <label>类型:
                                    <select name="type" aria-controls="dataTable"
                                            class="custom-select custom-select-sm form-control form-control-sm">
                                        <option value="" >全部</option>
                                        <option value="1" #if($!form.type ==1 ) selected #end >提现</option>
                                        <option value="0" #if($!form.type ==0 ) selected #end >返佣</option>
                                    </select>
                                </label>
                            </div>

                            <div class="form-group mx-sm-3">
                                <div class="dataTables_filter float-right">
                                    <button class="btn btn-primary" onclick="jump('list_form',1)">搜索</button>
                                </div>
                            </div>
                        </div>
                        <br>
                        <div class="row">
                            <div class="col-sm-12 col-md-12"  >
                                <div class="form-inline float-right">
                                    <label>显示
                                        <select name="rows"  onchange="submit()"  class="form-control">
                                            <option value="10" #if($respData.pagerow == 10) selected #end>10</option>
                                            <option value="15" #if($respData.pagerow == 15) selected #end>15</option>
                                            <option value="20" #if($respData.pagerow == 20) selected #end>20</option>
                                            <option value="25" #if($respData.pagerow == 25) selected #end>25</option>
                                        </select>
                                        行</label>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12 table-outer-box">
                                <table class="table table-bordered dataTable" id="countTable" width="100%" cellspacing="0" role="grid" aria-describedby="dataTable_info" style="width: 100%;">
                                    <thead>
                                    <tr role="row">
                                        <th>佣金余额</th>
                                        <th>金币余额</th>
                                        <th>剩余积分</th>
                                        <th>邀请人数</th>
                                        <th>应分润</th>
                                        <!--<th>实际分润</th>-->
                                        <th>操作</th>
                                    </tr>
                                    </thead>

                                    <tbody>
                                    <tr>
                                        <td>$!count.commission</td>
                                        <td>$!count.money</td>
                                        <td>$!count.score</td>
                                        <td>$!count.ins</td>
                                        <td>$!count.sums</td>
                                        <!--<td>$!count.</td>-->
                                        <td>
                                            <button type="button" class="btn btn-info" data-toggle="modal"
                                                    data-target="#ex-back-big">客户提现</button>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12 table-outer-box">
                                <table class="table table-bordered dataTable" id="dataTable" width="100%" cellspacing="0" role="grid" aria-describedby="dataTable_info" style="width: 100%;">
                                    <thead>
                                    <tr role="row">
                                        <th>姓名</th>
                                        <th>电话</th>
                                        <th>充值</th>
                                        <th>分润</th>
                                        <th>时间</th>
                                        <th>类型</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    #foreach($row in ${respData.getRows()} )
                                    <tr>
                                        <td>$!row.sname</td>
                                        <td>$!row.tel</td>
                                        <td >$!row.money</td>
                                        <td>$!row.pay</td>
                                        <td>$!row.ctime</td>
                                        <td>
                                            #if($!row.type == 0)
                                                返佣
                                            #elseif($!row.type == 1)
                                                提现
                                            #else
                                                未知
                                            #end
                                            </td>
                                    </tr>
                                    #end
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 col-md-5">
                                <div class="dataTables_info" id="dataTable_info" role="status" aria-live="polite">
                                    显示 $!respData.s 到 $!respData.e 一共 $!respData.total 条
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-7">
                                <div class="dataTables_paginate paging_simple_numbers" id="dataTable_paginate">
                                    <ul class="pagination float-right">
                                        #page("/suser/invite?rows=$!respData.1" $respData )
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </div>
        <!-- /.container-fluid -->
        #parse("/inc/copyright.htm")
    </div>
    <!-- /.content-wrapper -->
</div>
#parse("/inc/footer.htm")
<script>
    $('.form_date').prop("readonly", true).datetimepicker({
        minView: 'month',
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 0,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        format: 'yyyy-mm-dd'
    });
</script>

</body>
</html>
